package com.woniu.cq.medical.dao.mymapper;

import com.woniu.cq.medical.dao.ProjectInfoMapper;
import com.woniu.cq.medical.entity.ProjectInfo;
import org.apache.ibatis.annotations.Select;
import org.springframework.context.annotation.Primary;

import java.util.List;

/**
 * @Author: Klaus
 * @Date: 2020/9/8 16:22
 */
@Primary
public interface My_ProjectInfoMapper extends ProjectInfoMapper {

    /**
     * 根据大的检查类别的ID查询出小的检查类别
     * @param id
     * @return 小的检查类别的集合
     */
    @Select("SELECT project_info_id,project_name,project_price," +
            "project_check_address,project_type_Id " +
            "from lonbon_project_info " +
            "where project_type_Id = #{id}\n")
    List<ProjectInfo> selectProjectInfoByTypeId(Integer id);

    /**
     * 根据小类别的名称查询对应的小类别
     * @param name
     * @return 小的检查类别的集合
     */
    @Select("SELECT project_info_id,project_name,project_price," +
            "project_check_address,project_type_Id " +
            "from lonbon_project_info " +
            "where project_name = #{name}\n")
    ProjectInfo selectProjectInfoByName(String name);
}
